<template>
  <div>
    <h1>我的拼团</h1>
  </div>
  <div>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="groupId" label="Date" width="180" />
      <el-table-column prop="joinName" label="活动名称" width="180" />
      <el-table-column prop="orderNo" label="订单号" width="180" />
      <el-table-column prop="beginTime" label="起始时间" width="180" />
      <el-table-column prop="endTime" label="起始时间" width="180" />
      <el-table-column prop="orderAmount" label="订单价格" width="180" />
      <el-table-column prop="payTime" label="支付时间" width="180" />
    </el-table>
  </div>
</template>

<script setup lang="ts">
import { onMounted, ref } from "vue";
const tableData = ref([]);
import { mygroup } from "@/api/api";
import { ElMessage } from "element-plus";
const loadList = () => {
  mygroup().then((res) => {
    if (res.data.code == 200) {
      ElMessage.success("展示成功");
      tableData.value = res.data.data;
    } else {
      ElMessage.error(res.data.msg);
    }
  });
};
onMounted(() => {
  loadList();
});
</script>

<style scoped></style>
